<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../../base.jsp"%>
<%@ include file="../../baselist.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript" src="../../js/datepicker/WdatePicker.js"></script>
	<script type="text/javascript">
		function setFactoryName(valId,valName) {
		    console.log(valId)
            console.log(valName)
			var eleId = document.getElementById("factoryId");
            var eleName = document.getElementById("factoryName");
            eleId.value = valId;
            eleName.value = valName;
        }
	</script>
</head>
<body>
<form method="post">
	<input  type="text" name="contractProductId" value="${contractProductId}">
	<input  type="text" name="contractId" value="${contractId}">
    <input  type="text" name="id" value="${obj.id}">
<div id="menubar">
<div id="middleMenubar">
<div id="innerMenubar">
    <div id="navMenubar">
<ul>
<li id="save"><a href="#" onclick="formSubmit('${ctx}/cargo/ExtCproduct/update.action','_self');">确定</a></li>
<li id="back"><a href="${ctx}/cargo/ExtCproduct/toinsert.action?contractId=${contractId}&contractProductId=${contractProductId}">返回</a></li>
</ul>
    </div>
</div>
</div>
</div>
     
<div class="textbox" id="centerTextbox">
    
    <div class="textbox-header">
    <div class="textbox-inner-header">
    <div class="textbox-title">
		修改货物附件信息
    </div> 
    </div>
    </div>
<div>
 
    <div>
		<table class="commonTable" cellspacing="1">
	        <tr>
	            <td class="columnTitle_mustbe">厂家名称：</td>
					<td class="tableContent">
						<select name="factory" onchange="setFactoryName(this.options[this.selectedIndex].value,this.options[this.selectedIndex].text);">
								<option value="">---请选择---</option>
							<c:forEach items="${factoryList}" var="f">
								<option value="${f.id}" <c:if test="${obj.factoryId == f.id}">selected</c:if>>${f.factoryName}</option>
							</c:forEach>
						</select>
                        <input type="hidden" id="factoryId" name="factoryId" value="${obj.factoryId}"/>
                        <input type="hidden" id="factoryName" name="factoryName" value="${obj.factoryName}"/>
					</td>
	            <td class="columnTitle_mustbe">附件货号：</td>
				<td class="tableContent"><input type="text" name="productNo" value="${obj.productNo}"/></td>
	        </tr>
			<tr>
				<td class="columnTitle_mustbe">附件类型：</td>
				<td class="tableContent">
					<select name="ctype" >
						<option value="">---请选择---</option>
						<c:forEach items="${ctypeList}" var="cl">
							<option value="${cl.orderNo}" <c:if test="${obj.ctype == cl.orderNo}">selected</c:if>>${cl.name}</option>
						</c:forEach>
					</select>
				</td>
				<td class="columnTitle_mustbe">附件照片：</td>
				<td class="tableContent"><input type="text" name="productImage" value="${obj.productImage}"/></td>
			</tr>
	        <tr>
  				<td class="columnTitle_mustbe">数量：</td>
	            <td class="tableContent"><input type="text" name="cnumber" value="${obj.cnumber}"/></td>
				<td class="columnTitle_mustbe">包装单位：</td>
				<td class="tableContent"><input type="text" name="packingUnit" value="${obj.packingUnit}"/></td>
			</tr>
			<tr>
			<td class="columnTitle_mustbe">单价：</td>
			<td class="tableContent"><input type="text" name="price" value="${obj.price}"/></td>
			<td class="columnTitle_mustbe">排序号：</td>
			<td class="tableContent"><input type="text" name="orderNo" value="${obj.orderNo}"/></td>
			</tr>
	        <tr>
				<td class="columnTitle_mustbe">货物要求：</td>
				<td class="tableContent"><textarea name="productRequest" style="height:100px;">${obj.productRequest}</textarea></td>
				<td class="columnTitle_mustbe">附件描述：</td>
				<td class="tableContent"><textarea name="productDesc" style="height:100px;">${obj.productDesc}</textarea></td>
	        </tr>
		</table>
	</div>
</div>
</form>
</body>
</html>

